package com.kakarote.examine.entity.PO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * @author: admin
 * @version: v1.0
 * @date:2023/5/24
 */

/**
 * 审批流程字段授权表
 */
@ApiModel(description = "审批流程字段授权表")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "wk_examine_flow_auth_field")
public class ExamineFlowAuthField {


    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键id")
    private Long id;

    /**
     * 流程id
     */
    @TableField(value = "flow_id")
    @ApiModelProperty(value = "流程id")
    private Long flowId;

    /**
     * 审批ID
     */
    @TableField(value = "examine_id")
    @ApiModelProperty(value = "审批ID")
    private Long examineId;

    /**
     * crm模块
     */
    @TableField(value = "`label`")
    @ApiModelProperty(value = "crm模块")
    private Integer label;

    /**
     * 字段id
     */
    @TableField(value = "field_id")
    @ApiModelProperty(value = "字段id")
    private Long fieldId;

    /**
     * 字段标识
     */
    @TableField(value = "field_name")
    @ApiModelProperty(value = "字段标识")
    private String fieldName;

    /**
     * 字段名称
     */
    @TableField(value = "`name`")
    @ApiModelProperty(value = "字段名称")
    private String name;

    /**
     * 权限 1不可编辑不可查看 2可查看不可编辑 3可编辑可查看
     */
    @TableField(value = "auth_level")
    @ApiModelProperty(value = "权限 1不可编辑不可查看 2可查看不可编辑 3可编辑可查看")
    private Integer authLevel;




    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 创建人ID
     */
    @TableField(value = "create_user_id")
    @ApiModelProperty(value = "创建人ID")
    private Long createUserId;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 修改人ID
     */
    @TableField(value = "update_user_id")
    @ApiModelProperty(value = "修改人ID")
    private Long updateUserId;


    @TableField(value = "has_children")
    @ApiModelProperty(value = "是否含有下级字段(0否 1是）")
    private Integer hasChildren;

    @TableField(value = "parent_id")
    @ApiModelProperty(value = "父级id")
    private Long parentId;


    @TableField(value = "table_level")
    @ApiModelProperty(value = "明细表格权限（十进制转二进制）")
    private Integer tableLevel;


    @ApiModelProperty(value = "明细表格字段")
    @TableField(exist = false)
    private List<ExamineFlowAuthField> fieldExtendList;
}